package com.pay.paytoken.app;


import com.pay.paytoken.activity.lock.LockManager;
import com.tencent.tinker.loader.app.TinkerApplication;
import com.tencent.tinker.loader.shareutil.ShareConstants;

import appUtils.AppUtil;
import appUtils.PayTokenException;
import appUtils.ToastUtil;
import totpUtils.SPUtils;

/**
 * Created by Joe on 2017/3/29 0029 10:56.
 */

public class PayTokenApplication extends TinkerApplication {

    public PayTokenApplication() {
        super(ShareConstants.TINKER_ENABLE_ALL, "com.pay.paytoken.bugly.PayTokenApplicationLike",
                "com.tencent.tinker.loader.TinkerLoader", false);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        init();
    }

    void init() {
        initPayToken();
        // TOTP START
        AppUtil.getInstance().init(getApplicationContext());
        SPUtils.init(getApplicationContext());
        LockManager.getInstance().init(getApplicationContext());
        ToastUtil.init(getApplicationContext());
    }

    private void initPayToken() {
        PayTokenException.getInstance().init(getApplicationContext());
    }

}
